from flask_sqlalchemy import SQLAlchemy

db = SQLAlchemy()


class User(db.Model):

	__talbename__ = 'user'
	user_id = db.Column(db.Integer, primary_key=True)
	user_email = db.Column(db.String(250),  unique=True, nullable=False)
	user_name = db.Column(db.String(50),  unique=True, nullable=False)
	user_password = db.Column(db.String(50))
	user_nickname = db.Column(db.String(50))
	
	def __str__(self):
		return '%s, %s, %s, %s' % (self.user_id, self.user_email,self.user_name, self.user_nickname)
		
	__repr__ = __str__


class Post(db.Model):

	__talbename__ = 'post'
	id = db.Column(db.Integer, primary_key=True)
	text = db.Column(db.String(250))
	